package com.shuqi.model.bean;

import java.io.Serializable;

public class BookContentLineInfo implements Serializable {
    private static final long serialVersionUID = 8162619902105702037L;
    /** 第一个字节的索引 */
    private int firstIndex;
    /** 最后一个字节的索引 */
    private int endIndex;
    /** 每行的文字内容 */
    private String content;

    /** 本行的内容类型：0正文，1章节名 ，2段落开始标记，3段落结束标记 */
    private int lineType = 0;

    /** 每一行里的坐标集合 x1,y1; x2,y2... */
    private float[] lineXys;

    private boolean isEnter = false;


    public boolean isEnter() {
        return isEnter;
    }

    public void setEnter(boolean isEnter) {
        this.isEnter = isEnter;
    }

    public BookContentLineInfo() {

    }

    public BookContentLineInfo(BookContentLineInfo info, int firstIndex, int endIndex,
            String content) {
        this.firstIndex = firstIndex;
        this.endIndex = endIndex;
        this.content = content;
    }

    /** 本行的内容类型：0正文，1章节名 */
    public int getLineType() {
        return lineType;
    }

    /** 本行的内容类型：0正文，1章节名 */
    public void setLineType(int lineType) {
        this.lineType = lineType;
    }

    public float[] getXys() {
        if (lineXys == null) {
            if (content == null) {
                lineXys = new float[0];
            } else {
                lineXys = new float[content.length() * 2];
            }
        }
        return lineXys;
    }

    public void setXys(float[] xys) {
        this.lineXys = xys;
    }

    public int getFirstIndex() {
        return firstIndex;
    }

    public void setFirstIndex(int firstIndex) {
        this.firstIndex = firstIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public void setEndIndex(int endIndex) {
        this.endIndex = endIndex;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


}
